Skip to content

Commit 4d56731

Browse files
Merge branch 'dev' into 'main'
Example: updates for 1.9.1 release, fixes, improvements See merge request objectbox/objectbox-swift-public!13
2 parents e94881e + 5c08b4f commit 4d56731

File tree

9 files changed

+94
-73
lines changed

9 files changed

+94
-73
lines changed

Example/NotesExample-iOS/Base.lproj/Main.storyboard

Lines changed: 57 additions & 54 deletions
Large diffs are not rendered by default.

Example/NotesExample-iOS/NotesOverviewViewController.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ extension NotesOverviewViewController {
143143
override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
144144
if editingStyle == .delete {
145145
deleteNote(at: indexPath.row)
146-
tableView.deleteRows(at: [indexPath], with: .fade)
147146
} else if editingStyle == .insert {
148147
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view.
149148
}

Example/NotesExample-macOS/AppDelegate.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,16 @@ class AppDelegate: NSObject, NSApplicationDelegate {
5656
logger.append("❌ ERROR: \(error)")
5757
}
5858

59+
print(logger.string)
60+
}
61+
62+
func applicationDidBecomeActive(_ notification: Notification) {
5963
let viewController = NSApp.mainWindow?.contentViewController
6064
if viewController != nil {
6165
logger.display(viewController: viewController!)
6266
} else {
63-
logger.append("No ViewController!?") // fix this
67+
logger.append("No ViewController!?")
6468
}
65-
print(logger.string)
6669
}
6770

6871
func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {

Example/NotesExample-macOS/Base.lproj/Main.storyboard

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
2+
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="22155" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
33
<dependencies>
44
<deployment identifier="macosx"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22155"/>
66
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
77
</dependencies>
88
<scenes>
@@ -713,14 +713,14 @@
713713
<scrollView borderType="none" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yIL-M5-kCh">
714714
<rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
715715
<clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="7s2-Ef-2aA">
716-
<rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
716+
<rect key="frame" x="0.0" y="0.0" width="465" height="270"/>
717717
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
718718
<subviews>
719719
<textView importsGraphics="NO" richText="NO" verticallyResizable="YES" smartInsertDelete="YES" id="OuG-IE-n35">
720-
<rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
720+
<rect key="frame" x="0.0" y="0.0" width="465" height="270"/>
721721
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
722722
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
723-
<size key="minSize" width="480" height="270"/>
723+
<size key="minSize" width="465" height="270"/>
724724
<size key="maxSize" width="480" height="10000000"/>
725725
<color key="insertionPointColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
726726
</textView>
@@ -731,7 +731,7 @@
731731
<autoresizingMask key="autoresizingMask"/>
732732
</scroller>
733733
<scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="TZu-Gj-n3a">
734-
<rect key="frame" x="464" y="0.0" width="16" height="270"/>
734+
<rect key="frame" x="465" y="0.0" width="15" height="270"/>
735735
<autoresizingMask key="autoresizingMask"/>
736736
</scroller>
737737
</scrollView>

Example/NotesExample.xcodeproj/project.pbxproj

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 50;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -198,8 +198,9 @@
198198
5070AAE4218066C0002305F8 /* Project object */ = {
199199
isa = PBXProject;
200200
attributes = {
201+
BuildIndependentTargetsInParallel = YES;
201202
LastSwiftUpdateCheck = 1000;
202-
LastUpgradeCheck = 1000;
203+
LastUpgradeCheck = 1500;
203204
ORGANIZATIONNAME = ObjectBox;
204205
TargetAttributes = {
205206
5039EC9C2181DA350095204F = {
@@ -213,6 +214,7 @@
213214
};
214215
5070AAEB218066C0002305F8 = {
215216
CreatedOnToolsVersion = 10.0;
217+
LastSwiftMigration = 1500;
216218
};
217219
};
218220
};
@@ -327,12 +329,12 @@
327329
CODE_SIGN_IDENTITY = "-";
328330
CODE_SIGN_STYLE = Automatic;
329331
COMBINE_HIDPI_IMAGES = YES;
332+
DEAD_CODE_STRIPPING = YES;
330333
INFOPLIST_FILE = "NotesExample-macOS/Info.plist";
331334
LD_RUNPATH_SEARCH_PATHS = (
332335
"$(inherited)",
333336
"@executable_path/../Frameworks",
334337
);
335-
MACOSX_DEPLOYMENT_TARGET = 10.13;
336338
PRODUCT_BUNDLE_IDENTIFIER = "io.objectbox.NotesExample-macOS";
337339
PRODUCT_NAME = "$(TARGET_NAME)";
338340
SDKROOT = macosx;
@@ -347,12 +349,12 @@
347349
CODE_SIGN_IDENTITY = "-";
348350
CODE_SIGN_STYLE = Automatic;
349351
COMBINE_HIDPI_IMAGES = YES;
352+
DEAD_CODE_STRIPPING = YES;
350353
INFOPLIST_FILE = "NotesExample-macOS/Info.plist";
351354
LD_RUNPATH_SEARCH_PATHS = (
352355
"$(inherited)",
353356
"@executable_path/../Frameworks",
354357
);
355-
MACOSX_DEPLOYMENT_TARGET = 10.13;
356358
PRODUCT_BUNDLE_IDENTIFIER = "io.objectbox.NotesExample-macOS";
357359
PRODUCT_NAME = "$(TARGET_NAME)";
358360
SDKROOT = macosx;
@@ -386,6 +388,7 @@
386388
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
387389
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
388390
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
391+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
389392
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
390393
CLANG_WARN_STRICT_PROTOTYPES = YES;
391394
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -397,6 +400,7 @@
397400
DEBUG_INFORMATION_FORMAT = dwarf;
398401
ENABLE_STRICT_OBJC_MSGSEND = YES;
399402
ENABLE_TESTABILITY = YES;
403+
ENABLE_USER_SCRIPT_SANDBOXING = NO;
400404
GCC_C_LANGUAGE_STANDARD = gnu11;
401405
GCC_DYNAMIC_NO_PIC = NO;
402406
GCC_NO_COMMON_BLOCKS = YES;
@@ -411,7 +415,8 @@
411415
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
412416
GCC_WARN_UNUSED_FUNCTION = YES;
413417
GCC_WARN_UNUSED_VARIABLE = YES;
414-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
418+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
419+
MACOSX_DEPLOYMENT_TARGET = 10.15;
415420
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
416421
MTL_FAST_MATH = YES;
417422
ONLY_ACTIVE_ARCH = YES;
@@ -447,6 +452,7 @@
447452
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
448453
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
449454
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
455+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
450456
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
451457
CLANG_WARN_STRICT_PROTOTYPES = YES;
452458
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -458,6 +464,7 @@
458464
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
459465
ENABLE_NS_ASSERTIONS = NO;
460466
ENABLE_STRICT_OBJC_MSGSEND = YES;
467+
ENABLE_USER_SCRIPT_SANDBOXING = NO;
461468
GCC_C_LANGUAGE_STANDARD = gnu11;
462469
GCC_NO_COMMON_BLOCKS = YES;
463470
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -466,7 +473,8 @@
466473
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
467474
GCC_WARN_UNUSED_FUNCTION = YES;
468475
GCC_WARN_UNUSED_VARIABLE = YES;
469-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
476+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
477+
MACOSX_DEPLOYMENT_TARGET = 10.15;
470478
MTL_ENABLE_DEBUG_INFO = NO;
471479
MTL_FAST_MATH = YES;
472480
SDKROOT = iphoneos;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

Example/Podfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
use_frameworks!
55

66
target 'NotesExample-iOS' do
7-
platform :ios, :deployment_target => '11.0'
7+
platform :ios, :deployment_target => '12.0'
88
pod 'ObjectBox'
99
end
1010

1111
target 'NotesExample-macOS' do
12-
platform :osx, :deployment_target => '10.13'
12+
platform :osx, :deployment_target => '10.15'
1313
pod 'ObjectBox'
1414
end

Example/model-NotesExample-iOS.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"type": 10
5555
},
5656
{
57-
"flags": 8,
57+
"flags": 520,
5858
"id": "6:6001769173142034944",
5959
"indexId": "1:6069708401898380544",
6060
"name": "author",

Example/model-NotesExample-macOS.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"type": 10
5555
},
5656
{
57-
"flags": 8,
57+
"flags": 520,
5858
"id": "6:6001769173142034944",
5959
"indexId": "1:6069708401898380544",
6060
"name": "author",

0 commit comments

Comments
 (0)