appodeal/appodeal-ios-demo

Objective C demo build error

Closed this issue · 4 comments

I have downloaded the codes for Objective C demo and follows the manual integration steps. I am using SDK version "Appodeal-iOS-SKD-Release-F-2018-02-26-2".

After manually adding the Appodeal.framework and Resources (plus other steps in the manual integration guide), I am facing the following issue:

Error: No known class method for selector 'canShow:forPlacement:'

For the following lines:

  1. if ([Appodeal canShow:AppodealAdTypeBanner forPlacement:placement]) {

Can you take a look and feedback?

Hello, master branch of demo is compatible with current Appodeal iOS SDK 2.4.1-Beta .
If your use old version of Appodeal SDK, you need to choose 2.1.x-support branch.

Thanks for the response @staskochkin .

I have changed to use version 2.4.1-Beta SDK and using the master branch codes. After the codes are compiled, the app crash with the following error:

2018-05-29 08:25:39.263949+0800 AppodealObjectiveCDemo[22996:571695] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named 'GDPRBoard' in bundle NSBundle </Users/calvinteoh/Library/Developer/CoreSimulator/Devices/3A920886-21C7-4797-8C1C-42F38B24C7D1/data/Containers/Bundle/Application/0997E0A4-2021-424E-AAC8-C3AE60177873/AppodealObjectiveCDemo.app> (loaded)'
*** First throw call stack:
(
0 CoreFoundation 0x00000001137021e6 __exceptionPreprocess + 294
1 libobjc.A.dylib 0x000000011aa27031 objc_exception_throw + 48
2 UIKit 0x0000000117d06c92 +[UIStoryboard storyboardWithName:bundle:] + 672
3 AppodealObjectiveCDemo 0x00000001109fe14c +[ASGDPR presentPrivacyUserStory:] + 316
4 AppodealObjectiveCDemo 0x00000001109fdecd +[ASGDPR present:legacy:] + 349
5 AppodealObjectiveCDemo 0x00000001109fdd4d +[ASGDPR present:] + 61
6 AppodealObjectiveCDemo 0x000000010fb42f04 -[ASAppDelegate initializeSDK] + 132
7 AppodealObjectiveCDemo 0x000000010fb42e29 -[ASAppDelegate application:didFinishLaunchingWithOptions:] + 89
8 UIKit 0x00000001173e975b -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 278
9 UIKit 0x00000001173eb1d2 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4123
10 UIKit 0x00000001173f062b -[UIApplication _runWithMainScene:transitionContext:completion:] + 1677
11 UIKit 0x00000001177b2e4a __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 866
12 UIKit 0x0000000117b85909 +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153
13 UIKit 0x00000001177b2a86 -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 236
14 UIKit 0x00000001177b32a7 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 675
15 UIKit 0x00000001181244d4 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 299
16 UIKit 0x000000011812436e -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 433
17 UIKit 0x0000000117e0862d __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 221
18 UIKit 0x0000000118003387 _performActionsWithDelayForTransitionContext + 100
19 UIKit 0x0000000117e084f7 -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 223
20 UIKit 0x0000000117b84fb0 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392
21 UIKit 0x00000001173eef0c -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 515
22 UIKit 0x00000001179c1a97 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361
23 FrontBoardServices 0x000000011ee392f3 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 331
24 FrontBoardServices 0x000000011ee41cfa __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 225
25 libdispatch.dylib 0x000000011c560848 _dispatch_client_callout + 8
26 libdispatch.dylib 0x000000011c565e14 _dispatch_block_invoke_direct + 592
27 FrontBoardServices 0x000000011ee6d470 FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 24
28 FrontBoardServices 0x000000011ee6d12e -[FBSSerialQueue _performNext] + 439
29 FrontBoardServices 0x000000011ee6d68e -[FBSSerialQueue _performNextFromRunLoopSource] + 45
30 CoreFoundation 0x00000001136a4bb1 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
31 CoreFoundation 0x00000001136894af __CFRunLoopDoSources0 + 271
32 CoreFoundation 0x0000000113688a6f __CFRunLoopRun + 1263
33 CoreFoundation 0x000000011368830b CFRunLoopRunSpecific + 635
34 GraphicsServices 0x000000011d285a73 GSEventRunModal + 62
35 UIKit 0x00000001173f20b7 UIApplicationMain + 159
36 AppodealObjectiveCDemo 0x000000010fb43c4f main + 111
37 libdyld.dylib 0x000000011c5dd955 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

@CalvinTp GDPRBoard.storyboard resource file should be added to Copy Bundle Resources build phase.
screen shot 2018-05-29 at 09 21 27
Check that this file exist in ASGDPR.framework/Resources in SDK folder. You can try to recompile ASGDPR.framework by use ASBuilder (ASGDPR project) aggregator target. After build this target copy result to SDK directory and copy all necessary resources

Thanks @staskochkin for the feedback