Skip to content

Commit db17e87

Browse files
Update for sample application
Update for sample application in swift and OBj-C
1 parent 6bfaf89 commit db17e87

File tree

18 files changed

+1433
-56
lines changed

18 files changed

+1433
-56
lines changed

Objective-C_sample/TestObjcApp/TestObjcApp.xcodeproj/project.pbxproj

Lines changed: 40 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@
207207
isa = XCBuildConfiguration;
208208
buildSettings = {
209209
ALWAYS_SEARCH_USER_PATHS = NO;
210+
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
210211
CLANG_ANALYZER_NONNULL = YES;
211212
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
212213
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
@@ -253,18 +254,21 @@
253254
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
254255
GCC_WARN_UNUSED_FUNCTION = YES;
255256
GCC_WARN_UNUSED_VARIABLE = YES;
256-
IPHONEOS_DEPLOYMENT_TARGET = 16.2;
257+
GENERATE_INFOPLIST_FILE = YES;
258+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
257259
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
258260
MTL_FAST_MATH = YES;
259261
ONLY_ACTIVE_ARCH = YES;
260262
SDKROOT = iphoneos;
263+
SKIP_INSTALL = YES;
261264
};
262265
name = Debug;
263266
};
264267
A2FFDDDA2A39D21D003E24C4 /* Release */ = {
265268
isa = XCBuildConfiguration;
266269
buildSettings = {
267270
ALWAYS_SEARCH_USER_PATHS = NO;
271+
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
268272
CLANG_ANALYZER_NONNULL = YES;
269273
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
270274
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
@@ -305,10 +309,12 @@
305309
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
306310
GCC_WARN_UNUSED_FUNCTION = YES;
307311
GCC_WARN_UNUSED_VARIABLE = YES;
308-
IPHONEOS_DEPLOYMENT_TARGET = 16.2;
312+
GENERATE_INFOPLIST_FILE = YES;
313+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
309314
MTL_ENABLE_DEBUG_INFO = NO;
310315
MTL_FAST_MATH = YES;
311316
SDKROOT = iphoneos;
317+
SKIP_INSTALL = YES;
312318
VALIDATE_PRODUCT = YES;
313319
};
314320
name = Release;
@@ -318,26 +324,37 @@
318324
buildSettings = {
319325
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
320326
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
327+
ASSETCATALOG_COMPILER_SKIP_APP_STORE_DEPLOYMENT = YES;
328+
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
321329
CODE_SIGN_STYLE = Automatic;
322330
CURRENT_PROJECT_VERSION = 1;
323-
DEVELOPMENT_TEAM = SF3Z2K36RZ;
331+
DEVELOPMENT_TEAM = UTS48T689H;
332+
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
324333
GENERATE_INFOPLIST_FILE = YES;
325334
INFOPLIST_FILE = TestObjcApp/Info.plist;
335+
INFOPLIST_KEY_CFBundleDisplayName = ObjcApp;
336+
INFOPLIST_KEY_LSApplicationCategoryType = NSCameraUsageDescription;
337+
INFOPLIST_KEY_NSCameraUsageDescription = "Require camera permission";
338+
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "uses photo library";
326339
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
327340
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
328341
INFOPLIST_KEY_UIMainStoryboardFile = Main;
329-
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
330-
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
331342
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
332343
LD_RUNPATH_SEARCH_PATHS = (
333344
"$(inherited)",
334345
"@executable_path/Frameworks",
335346
);
336347
MARKETING_VERSION = 1.0;
348+
MODULE_VERSION = 1.0;
337349
PRODUCT_BUNDLE_IDENTIFIER = com.extrieve.QuickCaptureTestDemo.TestSwiftApp;
338350
PRODUCT_NAME = "$(TARGET_NAME)";
351+
SKIP_INSTALL = YES;
352+
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
353+
SUPPORTS_MACCATALYST = NO;
354+
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
339355
SWIFT_EMIT_LOC_STRINGS = YES;
340-
TARGETED_DEVICE_FAMILY = "1,2";
356+
TARGETED_DEVICE_FAMILY = 1;
357+
VERSIONING_SYSTEM = "apple-generic";
341358
};
342359
name = Debug;
343360
};
@@ -346,26 +363,37 @@
346363
buildSettings = {
347364
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
348365
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
366+
ASSETCATALOG_COMPILER_SKIP_APP_STORE_DEPLOYMENT = YES;
367+
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
349368
CODE_SIGN_STYLE = Automatic;
350369
CURRENT_PROJECT_VERSION = 1;
351-
DEVELOPMENT_TEAM = SF3Z2K36RZ;
370+
DEVELOPMENT_TEAM = UTS48T689H;
371+
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
352372
GENERATE_INFOPLIST_FILE = YES;
353373
INFOPLIST_FILE = TestObjcApp/Info.plist;
374+
INFOPLIST_KEY_CFBundleDisplayName = ObjcApp;
375+
INFOPLIST_KEY_LSApplicationCategoryType = NSCameraUsageDescription;
376+
INFOPLIST_KEY_NSCameraUsageDescription = "Require camera permission";
377+
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "uses photo library";
354378
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
355379
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
356380
INFOPLIST_KEY_UIMainStoryboardFile = Main;
357-
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
358-
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
359381
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
360382
LD_RUNPATH_SEARCH_PATHS = (
361383
"$(inherited)",
362384
"@executable_path/Frameworks",
363385
);
364386
MARKETING_VERSION = 1.0;
387+
MODULE_VERSION = 1.0;
365388
PRODUCT_BUNDLE_IDENTIFIER = com.extrieve.QuickCaptureTestDemo.TestSwiftApp;
366389
PRODUCT_NAME = "$(TARGET_NAME)";
390+
SKIP_INSTALL = YES;
391+
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
392+
SUPPORTS_MACCATALYST = NO;
393+
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
367394
SWIFT_EMIT_LOC_STRINGS = YES;
368-
TARGETED_DEVICE_FAMILY = "1,2";
395+
TARGETED_DEVICE_FAMILY = 1;
396+
VERSIONING_SYSTEM = "apple-generic";
369397
};
370398
name = Release;
371399
};
@@ -379,7 +407,7 @@
379407
A2FFDDDA2A39D21D003E24C4 /* Release */,
380408
);
381409
defaultConfigurationIsVisible = 0;
382-
defaultConfigurationName = Release;
410+
defaultConfigurationName = Debug;
383411
};
384412
A2FFDDDB2A39D21D003E24C4 /* Build configuration list for PBXNativeTarget "TestObjcApp" */ = {
385413
isa = XCConfigurationList;
@@ -388,7 +416,7 @@
388416
A2FFDDDD2A39D21D003E24C4 /* Release */,
389417
);
390418
defaultConfigurationIsVisible = 0;
391-
defaultConfigurationName = Release;
419+
defaultConfigurationName = Debug;
392420
};
393421
/* End XCConfigurationList section */
394422
};

Objective-C_sample/TestObjcApp/TestObjcApp.xcodeproj/xcshareddata/xcschemes/TestObjcApp.xcscheme

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
</BuildableProductRunnable>
5353
</LaunchAction>
5454
<ProfileAction
55-
buildConfiguration = "Debug"
55+
buildConfiguration = "Release"
5656
shouldUseLaunchSchemeArgsEnv = "YES"
5757
savedToolIdentifier = ""
5858
useCustomWorkingDirectory = "NO"
@@ -69,7 +69,7 @@
6969
</BuildableProductRunnable>
7070
</ProfileAction>
7171
<AnalyzeAction
72-
buildConfiguration = "Debug">
72+
buildConfiguration = "Release">
7373
</AnalyzeAction>
7474
<ArchiveAction
7575
buildConfiguration = "Release"

Objective-C_sample/TestObjcApp/TestObjcApp/Base.lproj/Main.storyboard

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
1919
<subviews>
2020
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4u2-G9-OT1">
21-
<rect key="frame" x="102" y="409" width="164" height="35"/>
21+
<rect key="frame" x="102" y="521" width="164" height="35"/>
2222
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
2323
<state key="normal" title="Button"/>
2424
<buttonConfiguration key="configuration" style="plain" title="Launch Camera"/>
@@ -27,25 +27,60 @@
2727
</connections>
2828
</button>
2929
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Objective C App" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ytv-O8-DQV">
30-
<rect key="frame" x="31" y="189" width="331" height="54"/>
30+
<rect key="frame" x="31" y="102" width="331" height="54"/>
3131
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
3232
<fontDescription key="fontDescription" type="system" pointSize="30"/>
3333
<nil key="textColor"/>
3434
<nil key="highlightedColor"/>
3535
</label>
36+
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="pPN-gd-rmi">
37+
<rect key="frame" x="11" y="264" width="346" height="35"/>
38+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
39+
<state key="normal" title="Button"/>
40+
<buttonConfiguration key="configuration" style="plain" title="Load From Gallery"/>
41+
<connections>
42+
<action selector="btnLoadFromGalleryTap:" destination="BYZ-38-t0r" eventType="touchUpInside" id="52H-58-lLl"/>
43+
</connections>
44+
</button>
45+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Selected Images:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7JQ-cQ-gi0">
46+
<rect key="frame" x="31" y="227" width="222" height="21"/>
47+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
48+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
49+
<nil key="textColor"/>
50+
<nil key="highlightedColor"/>
51+
</label>
52+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kWa-PN-z3n">
53+
<rect key="frame" x="273" y="227" width="80" height="21"/>
54+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
55+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
56+
<nil key="textColor"/>
57+
<nil key="highlightedColor"/>
58+
</label>
3659
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xiU-Yu-LKc">
37-
<rect key="frame" x="102" y="537" width="164" height="35"/>
60+
<rect key="frame" x="102" y="564" width="164" height="35"/>
3861
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
3962
<state key="normal" title="Button"/>
4063
<buttonConfiguration key="configuration" style="plain" title="Action"/>
4164
<connections>
4265
<action selector="btnActionTap:" destination="BYZ-38-t0r" eventType="touchUpInside" id="ic6-tX-Z4A"/>
4366
</connections>
4467
</button>
68+
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ur8-z7-grH">
69+
<rect key="frame" x="35" y="307" width="322" height="35"/>
70+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
71+
<state key="normal" title="Button"/>
72+
<buttonConfiguration key="configuration" style="plain" title="Convert to TIFF"/>
73+
<connections>
74+
<action selector="btnConvertToTiffTap:" destination="BYZ-38-t0r" eventType="touchUpInside" id="CYF-Hq-pCZ"/>
75+
</connections>
76+
</button>
4577
</subviews>
4678
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
4779
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
4880
</view>
81+
<connections>
82+
<outlet property="lblSelectedImages" destination="kWa-PN-z3n" id="Z67-RL-EaK"/>
83+
</connections>
4984
</viewController>
5085
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
5186
</objects>

Objective-C_sample/TestObjcApp/TestObjcApp/ViewController.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66
//
77

88
#import <UIKit/UIKit.h>
9+
#import <Photos/Photos.h>
10+
#import <MobileCoreServices/MobileCoreServices.h>
911

10-
@interface ViewController : UIViewController
12+
@interface ViewController : UIViewController <UIImagePickerControllerDelegate, UINavigationControllerDelegate>
1113

1214
@end
1315

0 commit comments

Comments
 (0)