iOSLib

  1. ‹ Older
  2. 4 months ago

    Jason K

    Jul 8 Pre-Release Testers

    What you need is:

    Declare function userInteractionEnabled_ lib UIKitLib selector “setUserInteractionEnabled:” (obj_id as ptr, yesNo as Boolean)
    
    userInteractionEnabled_(myImageView.Handle, True)

    As for iOSKit - it’s a different thing than iOSLib. IOSKit is available at https://github.com/kingj5/IOSKit (link also in my signature). If you are familiar with git I recommend you fork the project so you can pull updates when they are made available. The project has some examples included but all you need to do is copy the Modules folder into your project for everything to be available.

  3. Grant S

    Jul 9 Pre-Release Testers, Xojo Pro Sydney, Australia

    Jason,

    Thanks for your input.

    Just another problem, is this supposed to be a function or a sub? This doesn't work as a function. It complains about a return value. I changed it to a sub and it will compile, but the app crashes.

    Any thoughts?

    Cheers
    Grant

  4. 3 months ago

    Jason K

    Jul 9 Pre-Release Testers

    Whoops yeah should be a sub. I just threw it together on the forum yesterday. Can you show the crash log? I might have something else wrong in the declare.

  5. Grant S

    Jul 9 Pre-Release Testers, Xojo Pro Sydney, Australia
    Edited 3 months ago

    Jason,

    Yes this might be what you're looking for:

    Crashed Thread:        0  Dispatch queue: com.apple.main-thread
    
    Exception Type:        EXC_CRASH (SIGABRT)
    Exception Codes:       0x0000000000000000, 0x0000000000000000
    Exception Note:        EXC_CORPSE_NOTIFY
    
    Application Specific Information:
    *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[XOJViewController setUserInteractionEnabled:]: unrecognized selector sent to instance 0x124603d40'
    terminating with uncaught exception of type NSException
    abort() called
    CoreSimulator 518.22 - Device: iPhone 6s - Runtime: iOS 11.4 (15F79) - DeviceType: iPhone 6s
    
    Application Specific Backtrace 1:
    0   CoreFoundation                      0x0000000106ec51e6 __exceptionPreprocess + 294
    1   libobjc.A.dylib                     0x0000000104948031 objc_exception_throw + 48
    2   CoreFoundation                      0x0000000106f46784 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
    3   UIKit                               0x00000001005676db -[UIResponder doesNotRecognizeSelector:] + 295
    4   CoreFoundation                      0x0000000106e47898 ___forwarding___ + 1432
    5   CoreFoundation                      0x0000000106e47278 _CF_forwarding_prep_0 + 120
    6   FullCredit.debug                    0x0000000100027912 iOSExtensions.=$AllowUserInteraction%%o<iOSView>b + 354
    7   FullCredit.debug                    0x0000000100030c24 View1.View1.Event_Open%%o<View1.View1> + 132
    8   FullCredit.debug                    0x0000000100014a6d iOSView.Constructor%%o<iOSView> + 1389
    9   FullCredit.debug                    0x000000010002768d iPhoneScreen.Event__Layout%%o<iPhoneScreen> + 269
    10  FullCredit.debug                    0x0000000100012861 iOSScreen.Constructor%%o<iOSScreen> + 113
    11  FullCredit.debug                    0x00000001000359dc _MakeDefaultScreen + 268
    12  FullCredit.debug                    0x0000000100035bae _Startup + 110
    13  rbframework.dylib                   0x0000000106bce13d GetIOSAppWindowHandle + 670
    14  UIKit                               0x00000001003306fb -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 278
    15  UIKit                               0x0000000100332172 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4123
    16  UIKit                               0x00000001003375cb -[UIApplication _runWithMainScene:transitionContext:completion:] + 1677
    17  UIKit                               0x00000001006f9f7e __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 866
    18  UIKit                               0x0000000100acca39 +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153
    19  UIKit                               0x00000001006f9bba -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 236
    20  UIKit                               0x00000001006fa3db -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 675
    21  UIKit                               0x000000010106b614 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 299
    22  UIKit                               0x000000010106b4ae -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 433
    23  UIKit                               0x0000000100d4f75d __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 221
    24  UIKit                               0x0000000100f4a4b7 _performActionsWithDelayForTransitionContext + 100
    25  UIKit                               0x0000000100d4f627 -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 223
    26  UIKit                               0x0000000100acc0e0 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392
    27  UIKit                               0x0000000100335eac -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 515
    28  UIKit                               0x0000000100908bcb -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361
    29  FrontBoardServices                  0x000000010a0682f3 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 331
    30  FrontBoardServices                  0x000000010a070cfa __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 225
    31  libdispatch.dylib                   0x0000000107c3b709 _dispatch_client_callout + 8
    32  libdispatch.dylib                   0x0000000107c408c1 _dispatch_block_invoke_direct + 317
    33  FrontBoardServices                  0x000000010a09c470 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
    34  FrontBoardServices                  0x000000010a09c12e -[FBSSerialQueue _performNext] + 439
    35  FrontBoardServices                  0x000000010a09c68e -[FBSSerialQueue _performNextFromRunLoopSource] + 45
    36  CoreFoundation                      0x0000000106e67bb1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    37  CoreFoundation                      0x0000000106e4c4af __CFRunLoopDoSources0 + 271
    38  CoreFoundation                      0x0000000106e4ba6f __CFRunLoopRun + 1263
    39  CoreFoundation                      0x0000000106e4b30b CFRunLoopRunSpecific + 635
    40  GraphicsServices                    0x000000010734ba73 GSEventRunModal + 62
    41  UIKit                               0x0000000100339057 UIApplicationMain + 159
    42  rbframework.dylib                   0x0000000106bce7bd GetIOSAppWindowHandle + 2334
    43  FullCredit.debug                    0x0000000100001f0d Xojo._RuntimeRun + 29
    44  FullCredit.debug                    0x0000000100035efd _Main + 749
    45  FullCredit.debug                    0x00000001000351e3 main + 19
    46  libdyld.dylib                       0x0000000107cb0955 start + 1
  6. Jason K

    Jul 9 Pre-Release Testers

    What is your code where you call that? It looks like you are passing the iOSView in. You need to instead pass the actual image view object’s handle.

  7. Grant S

    Jul 9 Pre-Release Testers, Xojo Pro Sydney, Australia

    I set it in the open event using this extension:

    Public Sub AllowUserInteraction(extends view as iOSView, assigns value as Boolean)
      declare sub userInteractionEnabled_ lib "UIKit" selector "setUserInteractionEnabled:" (obj_id as ptr, yesNo as Boolean)
      
      userInteractionEnabled_(view.Handle, value)
    End Sub

    This is view1 which is the view that loads on launch.

    Cheers
    Grant

  8. Jeremie L

    Jul 9 Pre-Release Testers, XDC Speakers Europe (France) - getpackr.io

    This should work:

    Public Sub AllowUserInteraction(extends imgView as iOSImageView, assigns value as Boolean)
      declare sub userInteractionEnabled_ lib "UIKit" selector "setUserInteractionEnabled:" (obj_id as ptr, yesNo as Boolean)
      
      userInteractionEnabled_(imgView, value)
    End Sub
  9. Grant S

    Jul 11 Pre-Release Testers, Xojo Pro Sydney, Australia

    Jeremie,

    Thank you so much for your reply. Yes this worked. Moving on.

    I'm now wondering why stuff like this is not already built into Xojo??

    Cheers
    Grant

  10. Jeremie L

    Jul 11 Pre-Release Testers, XDC Speakers Europe (France) - getpackr.io
    Edited 3 months ago

    You're welcome Grant !
    I consider this as an advanced feature, which is sort of hidden in the Apple iOS docs.
    Just like on Desktop, there are some features that are only available using declares.

  11. Grant S

    Jul 11 Pre-Release Testers, Xojo Pro Sydney, Australia

    My original problem still remains:

    Linking Executable
    ld: building for iOS, but linking against dylib built for OSX, file '/usr/lib/system/libdispatch.dylib' for architecture x86_64

    I know what is wrong but I don't know how to fix it.

    Cheers
    Grant

  12. Jason K

    Jul 11 Pre-Release Testers
    Edited 3 months ago

    Are you sure you have iOSKit installed? It is distinct from iOSLib.

    Edit: And if you are using iOSLib you need to move to AppleLib instead I think. Ulrich said that he is no longer supporting iOSLib about 2 years ago. If there is something specific that you need in iOSLib that iOSKit doesn't have I can see if that can be added as well. Trying to use them in the same project is difficult at best.

  13. Jeremie L

    Jul 11 Pre-Release Testers, XDC Speakers Europe (France) - getpackr.io

    Do you still need iOSLib ?

    Maybe @Ulrich B can help

  14. Ulrich B

    Jul 11 Pre-Release Testers, Xojo Pro Europe (Germany, Berlin) · xo...

    Sorry for not seeing this; my ISP created some outages during the last days for me and I must have missed the thread in the hundreds of mails that arrived later.
    Please try to change to constant name to

    /usr/lib/libSystem.dylib

    I do not maintain this version of AppleLib anymore. I started a new one with better integration of shared code which is now on hold due to the changes API 2.0 will bring.

  15. Grant S

    Jul 12 Pre-Release Testers, Xojo Pro Sydney, Australia

    Ulrich,

    Thanks!! This is now working and my app is looking awesome!!

    Cheers
    Grant

  16. 2 months ago

    Grant S

    Aug 10 Pre-Release Testers, Xojo Pro Sydney, Australia

    Ulrich,

    I'm trying to submit my iOS app to the Apple App Store, but I've received an email from Apple after submitting as follows:

    Dear Developer,

    We identified one or more issues with a recent delivery for your app, "XXXXXXX The App". Please correct the following issues, then upload again.

    Non-public API usage:

    The app references non-public selectors in XXXXXXX-The App: cgColor, pointValue, rectValue, setInputFormat:forBus:, sizeValue, timeStamp, valueWithPoint:, valueWithRect:, valueWithSize:
    If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed.

    Any ideas on how to fix this?

    Cheers
    Grant

  17. Ulrich B

    Aug 11 Pre-Release Testers, Xojo Pro Europe (Germany, Berlin) · xo...
    Edited 2 months ago

    @Grant S Any ideas on how to fix this?

    Please locate the getsizevalue, getrectvalue and getpointvalue external method declarations in AppleValue.
    Duplicate them.
    Uncheck the originals’ iOS checkboxes in Inspector.
    Make sure the new copies have the same name (remove their 1s), und make their selectors

    CGSizeValue, CGRectValue, CGPointValue

    Check only their iOS check boxes.

    Repeat the same with valuewithpoint, valuewithSize and ValuewithRect - name the iOS selectors

    valueWithCGPoint:, valueWithCGSize:, valueWithCGRect:

    In AVAudioNode, remove the setter of the inputFormat property and the setinputformat external method. This is read-only.
    The same should apply for outputformat. I wonder why that wasn’t noted?

    I cannot find selectors named cgColor and timestamp (with these exact cases) but I know the first one exists in iOSKit. Do you use it too?

    EDIT: Now I could find timestamp:
    Please locate AppleNSEvent und make the property Timestamp and the external method gettimestamp macOS-only.

    For cgColor, still, I cannot find it but this selector should be named "CGColor".

  18. Grant S

    Aug 12 Pre-Release Testers, Xojo Pro Sydney, Australia

    Ulrich,

    Thank you very much for your response, this has cleared up my app with only one problem left. Have you seen this one before? I can't find the info.plist so I can modify it:

    Dear Developer,

    We identified one or more issues with a recent delivery for your app, "Full Credit Podcast The App". Please correct the following issues, then upload again.

    Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSMicrophoneUsageDescription key with a string value explaining to the user how the app uses this data.

    Best regards,

    The App Store Team

  19. Ulrich B

    Aug 13 Pre-Release Testers, Xojo Pro Answer Europe (Germany, Berlin) · xo...
    Edited 2 months ago

    Glad to hear that, Grant!

    About the plist: There is none by default in your project, so you have to create it. See the LR .

  20. Greg O

    Aug 13 Xojo Inc

    @Ulrich B Glad to hear that, Grant!

    About the plist: There is none by default in your project, so you have to create it. See the LR .

    Just for clarity, what you are entering in the plist is a message that will appear to the user in the confirmation dialog which explains why your app wants access to the microphone.

  21. Grant S

    Aug 13 Pre-Release Testers, Xojo Pro Sydney, Australia

    Greetings all,

    Many thanks again to Ulrich, my app has now been submitted to the App Store for review....all issues solved. Thanks to Greg also. This has been a BIG learning experience.

    :-)

    Cheers
    Grant

or Sign Up to reply!