Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How can replace UIWebView with  WKWebView 

in Questions Posts: 58

When I submit my code to App Store, I got a response;
"ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs . See https://developer.apple.com/documentation/uikit/uiwebview for more information. After you’ve corrected the issues, you can upload a new binary to App Store Connect."
The UIWebView.h is included in the Frameworks/UIKit.frameworks/Headers folder in the exported zip file from Codea. But it looks we need to use WKWebView instead of UIWebView.
Please tell me the way to replace in order to clear the Apple's requirement.

«1

Comments

  • SimeonSimeon Admin Mod
    Posts: 5,400

    @Makoto good question. I've updated the Runtime to not depend on UIWebView and will re-build the frameworks for Codea 3.0.1 (next update)

  • SimeonSimeon Admin Mod
    Posts: 5,400

    3.0.1 is released now so you could try exporting from the latest version

  • Posts: 58

    Simeon,
    Thank you for your taking effort to accommodate changes in Xcode.
    However, I encounter another problem in Xcode with my projects zipped from the new Code 3.0.1.

    The error message is:
    ld: bitcode bundle could not be generated because '/Users/ishizuka/Desktop/DAanimation/DAanimeV2a/Frameworks/CraftKit.framework/CraftKit' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build file '/Users/ishizuka/Desktop/DAanimation/DAanimeV2a/Frameworks/CraftKit.framework/CraftKit' for architecture arm64

    I tried another project which was successfully built with the former Codea and got the same error. It looks there is another issue in the Framewroks included in the zipped project by Codea.

    Please let me know the way to avoid the error.

    Thanks, Makoto

  • edited January 18 Posts: 1,806
    @Makoto - are you running Xcode on Mac with Catalina? The latest OS needs all 64 bit code. I think it also requires registration with Apple to run compiled apps.
  • Posts: 58

    Big_G, thank you for your prompt comment.
    Yes I am running Xcode on Mac-Book Pro 9.2(mid 2012) with Catalina(macOS 10.16.2)
    So, how can I switch to 64bit code and get registration with Apple?

  • Posts: 58

    Using former version of Codea, there were no issues regarding "full bit code", except for the use of UIWebView. For me, this is the new phenomena with Codea 3.0.1

  • Posts: 58

    @Big_G - according to Apple's comment, it looks the source of this problem is the Frameworks/CraftKit.framework/CraftKit included in the zipped project by Codea 3.0.1. which was not included with former Codea version.
    Do you mean I need to register to Apple to feed Codea project to Xcode?

  • Posts: 1,806

    @Makoto - not sure how to get registration - thought you would have to submit code in usual way. I would expect there is an option in Xcode to get round this. Never used Xcode in anger.

    Curious, I have Catalina 15.2 on my Mac, driving me round the bend, is your 16.2 an update or a misprint?

  • SimeonSimeon Admin Mod
    Posts: 5,400

    @Makoto hmm thank you for reporting that issue, I wonder what's going on with the lack of bitcode in CraftKit. Will look into it

    You could try disabling Bitcode in the Xcode build settings for now

  • Posts: 58

    @Bir_G Thank you for your taking attention. Actually the version is 15.2,it was a typo, sorry.

    @Simeon thank you for your suggestion. However, since I have no clue about Xcode, I just deleted CraftKit under frameworks and related lines calling them. Then I got a new error message on ToolKit;

    Bitcode bundle could not be generated because '/Users/ishizuka/Desktop/CircumferentialAngleV1Ph3 2/Frameworks/ToolKit.framework/ToolKit' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build file '/Users/ishizuka/Desktop/CircumferentialAngleV1Ph3 2/Frameworks/ToolKit.framework/ToolKit' for architecture arm64

    Can I delete ToolKit as well?

  • SimeonSimeon Admin Mod
    Posts: 5,400

    @Makoto you can't really delete any of them, but if you go into your project (click the blue blueprint icon in the project navigator), then go to Build Settings, find the Enable Bitcode setting and set it to "No", that should work

    Is this happening when you try to build and run to a device? Or is it only happening when you Archive? It's odd because I am able to build and run exported projects with Bitcode here

  • Posts: 58

    @Simeon Thank you for your instruction.
    But I face another problem in the Archive organizer Window.

    1. I can build and run on devices directly connected to Mac.
    2. I managed to find "Build settings" tab and switch "Enable Bitcodes" to No. Then I can make an Archive.
    3. However, when I "Varidate App" in the Organizer Window, I get an error message " Couldn't find platforms familiy for "AudioKit.framework" saying
      -- Couldn't find CFBundleSupportedPlatforms in the info.list or L/C.VERSION_MIN in the Mach-O for path "User//Library/Developer/Xcode/Archives/2020-02-29/.xcarchive/Products/<App's name>.app/Frameworks/AudioKit.frameworke"

    It looks Codea3.0.1 doesn't work well with my Mac. Since former version of Codea is able to make successful archives, except for the usage of UIWebView, is there any way to use WKWebView instead of UIWebView in the former version of Codea?

  • SimeonSimeon Admin Mod
    Posts: 5,400

    @Makoto I'm going to look into your archive / validation error now

  • Posts: 58

    @Simeon
    Thank you for your keeping attention on my issue, but I got another syndrome!
    Since you can go through the project create with Code 3.0.1 with Xcode, I guess either my iPad or Mac has problem. In order to separate the source of the problem, I installed Codes 3.0.1 on my another iPad as well as iPhone6. Then I delivered the same code to those devices through Air Drop and made zipped project for Xcode.
    Then I tried to compile them in Xcode and got strange results;
    1. The first iPad which caused the error I reported above has the bitcode error in CraftKit, but for AudioKit.
    2. The second iPad ends up the error "error: module compiled with Swift 5.0 cannot be imported by the Swift 5.1.3 compiler: /Users//Frameworks/RuntimeKit.framework/Modules/RuntimeKit.swiftmodule/arm64.swiftmodule"
    3. The iPhone resulted the same error as the second iPad.

    Maybe you will not be able to reproduce the situation, but it will be helpful for me to contact Apple if you can suggest your guess about the source of the problem.
    Thanks -Makoro

  • SimeonSimeon Admin Mod
    Posts: 5,400

    @Makoto I'm doing a big update to Codea and the runtime at the moment, so when these new features are finished I'll be updating the Xcode export to work with it. When I do this I'll make sure I can submit an app to Apple using the Archive feature.

  • Posts: 58

    @ Simeon How are you doing under this corona situation? With regard to my issue above, meantime I asked Apple Tech support for help. However, they decided the issue is on the third party app, i.e. Codea and declined my request. So, I still need your help. If you like, I can send a simple project, a boiler plate project created by Codea, which still has this issue. How can I send the zip file to you?

  • SimeonSimeon Admin Mod
    Posts: 5,400

    @Makoto are you able to delete the frameworks from the Frameworks/ folder and try rebuild your project? I've updated all the frameworks to 3.1

    You may still experience the bitcode issue but you can disable bitcode for now to work around it

  • Posts: 549
    @Makoto i have the same problem as you when trying to validate the app in the xcode organiser. I think we have to add cfbundleSupportedPlatform in the build somehow, but dont know how to do it, so am stuck like you. @Simeon we need you!
  • Posts: 58

    @Siemon I tried Codea 3.1 on iOS 12.4, then the bitcode error was disappeared, however, I got a new error:
    "compiling for iOS 12.1, but module 'RuntimeKit' has a minimum deployment target of iOS 12.4: /Users/ishizuka/Desktop/Codea3.1/CircleV201A/Frameworks/RuntimeKit.framework/Modules/RuntimeKit.swiftmodule/x86_64.swiftmodule"
    I have no idea how iOS 12.1 was involved.

    With regard to you suggestion, I deleted Frameworks folder in the zipped project and tried to build the modified project in Xcode.
    Then I get an error:
    "Failed to Download Codea Library. Please ensure you have an active Internet connection.
    /Users/ishizuka/Library/Developer/Xcode/DerivedData/CircleV201A-bnykztkdamjkwkapslhmtxypdxhi/Build/Intermediates.noindex/CircleV201A.build/Debug-iphonesimulator/CircleV201A.build/Script-DB0F6145226DFA490024AE28.sh: line 17: return: can only `return' from a function or sourced script", though I have an active Internet connection.

  • Posts: 58

    @Simeon Thank you. Finally, I am able to make a build a project made with Codea 3.1 for Xcode successfully. Somehow the bitcode problem was solved with Codea 3.1.
    The "RuntimeKit" problem I mentioned above was my mistake. Under Development Info in Xcode, the Target iOS version was set as 12.1 as default in my Xcode. After setting iOS version as 12.4, the problem was cleared,
    Thank you for your support.

    oops! The build running on a connected device complains about the way to call Dropbox.asset, suggesting to use asstet. although the build can run on the device.
    I will post a new agenda for this issue after correcting detail information.

  • Posts: 549

    @Makoto you can change the deployment target to ios 12.4 in the build settings.

  • Posts: 58

    @Simeon I am sure that I once saw a warning that "Dropbox.asset as obsolete...", but the warning never appears afterwards. So, for now there is no issue on this.

    With regard to the bitcode issue, I replace Framework holder in a project made with Codea 3.0.1 with new Framework made with Codea. Then the project can be built successfully. So it seems the set of files in the older Codea(3.0.1) caused the bitcode problem. In order to identify the root cause of the bitcode issue, it might be helpful to clarify the changes you made in Frameworks for Codea 3.1. For the future sake, it might be worthwhile to know the cause which might induce errors under certain environment.

    Thanks,
    - Makoto

  • Posts: 58

    @Simeon Sorry for disturbing you again. Actualy the bitcode issue was not solved. Even with Codea 3.1, I have the same situation which I reported on Jan.23 and Jan.29. I.e. building the project faces the bitcode error and "disable bitcode" makes an archive with "AudioKit" error in Validation of the archive.
    Thus I am still in trouble for making an Archive for distribution.

  • SimeonSimeon Admin Mod
    Posts: 5,400

    @Makoto I am trying to fix the bitcode issue now. I'll upload new frameworks in a bit and let you know — when I do could you delete and rebuild once more to test?

    Let you know soon

  • SimeonSimeon Admin Mod
    Posts: 5,400

    @Makoto could you try again now? The latest are built with bitcode

  • edited April 17 Posts: 549

    @Simeon, thanks for the new frameworks, with them i was able to make a build successfully with BITCODE enabled.

    Nevertheless, when trying to make an archive in the Administrator tool, I still get the problem i and Makato reported previously:

    Couldn't find CFBundleSupportedPlatforms in the Info.plist, LC_VERSION_MIN, or LC_BUILD_VERSION in the Mach-O for path "/Users/paschalcoyle/Library/Developer/Xcode/Archives/2020-04-14/evtdisplay200413 14-04-2020, 17.18.xcarchive/Products/Applications/evtdisplay200413.app/Frameworks/AudioKit.framework".

    I think you (we) might have to add CFBundleSupportedPlatforms somehow in the plist.info ??

  • SimeonSimeon Admin Mod
    Posts: 5,400

    @piinthesky thanks, I think I can fix that and will give it a try now

  • SimeonSimeon Admin Mod
    Posts: 5,400

    @piinthesky I've generated new frameworks to hopefully address this issue. Can you delete the frameworks from /Frameworks and rebuild?

  • Posts: 549

    @Simeon, no same error, build succeeds but fails when do the validate app in administrator:

    **Couldn't find platform family for "AudioKit.framework".

    Couldn't find CFBundleSupportedPlatforms in the Info.plist, LC_VERSION_MIN, or LC_BUILD_VERSION in the Mach-O for path "/Users/paschalcoyle/Library/Developer/Xcode/Archives/2020-04-17/evtdisplay200413 17-04-2020, 14.17.xcarchive/Products/Applications/evtdisplay200413.app/Frameworks/AudioKit.framework".**

  • edited April 17 Posts: 549

    @Simeon, the plist.info is not in the frameworks?

  • SimeonSimeon Admin Mod
    Posts: 5,400

    That is so odd, thank you for testing. What's the administrator tool?

  • Posts: 549

    @Simeon maybe i have the wrong name-it is what appears when one selects 'archive' from the xcode 'product' menu.

  • Posts: 549

    @Simeon in my previous entry, i was saying that changing the frameworks will not change the info.plist, and accordin to the error message the problem seems to be in the plist.

  • SimeonSimeon Admin Mod
    Posts: 5,400

    @piinthesky this should be fixed now. Sorry about all the trial and error, I've just tested on my local machine and I am able to validate an archive successfully

    Please delete the frameworks one more time!

  • Posts: 549

    @Simeon, Eureka- that works. Well done, one step further towards an app!

  • Posts: 549

    @Simeon, gosh this is frustrating, should it be so difficult! There is a new error in the validate step. I think there might be a problem with the AudioKit framework, it says in the IDEDistributionPipeline.log that the 'code object is not signed at all' (see end of the following log). I can send you the full log if you think useful.

    020-04-17 17:53:07 +0000 Writing entitlements for ', codeSigningInfo='<_DVTCodeSigningInformation_Path: 0x7fc3c8ce8f00; isSigned='1', isAdHocSigned='0', signingCertificate='<DVTSigningCertificate: 0x7fc3c7131bf0; name='Apple Development: Paschal Coyle (6L2N8FL4ZW)', hash='EED5C8382347255F9A80CF9E9AF7F7A1CDD0192D', serialNumber='3B03801741081C6A', certificateKinds='( "1.2.840.113635.100.6.1.12", "1.2.840.113635.100.6.1.2" ), issueDate='2020-04-17 15:10:02 +0000''>', entitlements='(null)', teamID='Y73N464VH8', identifier='io.audiokit.AudioKit', executablePath='<DVTFilePath:0x7fc3c891fb20:'/Users/paschalcoyle/Library/Developer/Xcode/Archives/2020-04-17/evtdisplay200413 17-04-2020, 19.50.xcarchive/Products/Applications/evtdisplay200413.app/Frameworks/AudioKit.framework/AudioKit'>', hardenedRuntime='0'>'> to: /var/folders/nl/3g6r8xf94j598_f07zh909x80000gn/T/XcodeDistPipeline.~yAAkPk/entitlements~IWdw7d
    2020-04-17 17:53:07 +0000 Running /usr/bin/codesign '-vvv' '--force' '--sign' 'E0D9EA61C759F3669A849F21BB2A64B3C02C5C1E' '--entitlements' '/var/folders/nl/3g6r8xf94j598_f07zh909x80000gn/T/XcodeDistPipeline.~yAAkPk/entitlements~IWdw7d' '--preserve-metadata=identifier,flags,runtime' '/var/folders/nl/3g6r8xf94j598_f07zh909x80000gn/T/XcodeDistPipeline.~~~yAAkPk/Root/Payload/evtdisplay200413.app/Frameworks/AudioKit.framework'
    2020-04-17 17:53:07 +0000 /var/folders/nl/3g6r8xf94j598_f07zh909x80000gn/T/XcodeDistPipeline.~~~yAAkPk/Root/Payload/evtdisplay200413.app/Frameworks/AudioKit.framework: replacing existing signature
    2020-04-17 17:53:07 +0000 /var/folders/nl/3g6r8xf94j598_f07zh909x80000gn/T/XcodeDistPipeline.~~~yAAkPk/Root/Payload/evtdisplay200413.app/Frameworks/AudioKit.framework: code object is not signed at all
    2020-04-17 17:53:07 +0000 /usr/bin/codesign exited with 1

  • SimeonSimeon Admin Mod
    Posts: 5,400

    Sounds like a corrupt framework issue. Possibly due to the fact that I renamed that framework but didn't update the project

    For now try this:

    • In your Xcode project delete "AudioKit.framework" from the frameworks group
    • Do not move it to trash, just "Delete Rereference"
    • Drag the AudioKit.framework back into the Frameworks group from the Finder
    • Go to your target settings (click the little blue project icon in the navigator then select your target)
    • Go to Build Phases
    • Under "Link with Binary Libraries" ensure "AudioKit.framework" is there, if not, add it
    • Under "Embed Frameworks" ensure "AudioKit.framework" is there, if not, add it

    I'm going to pull AudioKit as a requirement for the runtime. All it's there for is giving access to the microphone volume and frequency and it's causing so much complexity. This means the mic library won't be available to exported apps

  • edited April 18 Posts: 549

    @Simeon, that did not fix it.

    I then tried to remove audiokit completely, but that was a mistake as the build still seems to need it. Now i have deleted the audiokit and can't get it back! I will start from scratch with a new export.

    Edit: now back to how it was-the problem with audiokit in the validate

    @Makoto did you make any progress?

  • SimeonSimeon Admin Mod
    Posts: 5,400

    @piinthesky yeah I need to remove its dependency from RuntimeKit before you can remove it. I'll need some time to do this and will let you know when it's done

  • SimeonSimeon Admin Mod
    Posts: 5,400

    @piinthesky

    Okay, I think I got this working.

    Could you please change your libversion file to say 3.2, delete all the .framework files from the Frameworks/ folder and rebuild in Xcode

    Then in your Xcode project navigate to the "Frameworks" group in the navigation pane on the left. Delete the AudioKit.framework

    (This won't be necessary once Codea 3.2 is released, but you can get a head start by building against the Codea 3.2 libraries)

  • Posts: 549

    @Simeon, did as you suggested.

    Now I have a similar error at the end of the IDEDistrbutionPipeline.log during the validate app step of the archive. This time it is for the CraftKit.

    I think i have things correctly set up within my apple developer account, but i am not expert and it is quite complicated. I hope i have not screwed up there somewhere.

    2020-04-23 15:45:16 +0000 Processing step: IDEDistributionCodesignStep
    2020-04-23 15:45:16 +0000 Entitlements for ', codeSigningInfo='<_DVTCodeSigningInformation_Path: 0x7f9b9a10fe30; isSigned='1', isAdHocSigned='0', signingCertificate='<DVTSigningCertificate: 0x7f9ba11cc3d0; name='Apple Development: Paschal Coyle (6L2N8FL4ZW)', hash='EED5C8382347255F9A80CF9E9AF7F7A1CDD0192D', serialNumber='3B03801741081C6A', certificateKinds='( "1.2.840.113635.100.6.1.12", "1.2.840.113635.100.6.1.2" ), issueDate='2020-04-17 15:10:02 +0000''>', entitlements='(null)', teamID='Y73N464VH8', identifier='com.twolivesleft.CraftKit', executablePath='<DVTFilePath:0x7f9b9b4dac50:'/Users/paschalcoyle/Library/Developer/Xcode/Archives/2020-04-23/evtdisplay200418 23-04-2020, 17.44.xcarchive/Products/Applications/evtdisplay200418.app/Frameworks/CraftKit.framework/CraftKit'>', hardenedRuntime='0'>'>: {
    }
    2020-04-23 15:45:16 +0000 Writing entitlements for ', codeSigningInfo='<_DVTCodeSigningInformation_Path: 0x7f9b9a10fe30; isSigned='1', isAdHocSigned='0', signingCertificate='<DVTSigningCertificate: 0x7f9b9ac11d50; name='Apple Development: Paschal Coyle (6L2N8FL4ZW)', hash='EED5C8382347255F9A80CF9E9AF7F7A1CDD0192D', serialNumber='3B03801741081C6A', certificateKinds='( "1.2.840.113635.100.6.1.12", "1.2.840.113635.100.6.1.2" ), issueDate='2020-04-17 15:10:02 +0000''>', entitlements='(null)', teamID='Y73N464VH8', identifier='com.twolivesleft.CraftKit', executablePath='<DVTFilePath:0x7f9b9b4dac50:'/Users/paschalcoyle/Library/Developer/Xcode/Archives/2020-04-23/evtdisplay200418 23-04-2020, 17.44.xcarchive/Products/Applications/evtdisplay200418.app/Frameworks/CraftKit.framework/CraftKit'>', hardenedRuntime='0'>'> to: /var/folders/nl/3g6r8xf94j598_f07zh909x80000gn/T/XcodeDistPipeline.~EppFHG/entitlements~8eE6XG
    2020-04-23 15:45:16 +0000 Running /usr/bin/codesign '-vvv' '--force' '--sign' 'E0D9EA61C759F3669A849F21BB2A64B3C02C5C1E' '--entitlements' '/var/folders/nl/3g6r8xf94j598_f07zh909x80000gn/T/XcodeDistPipeline.~EppFHG/entitlements~8eE6XG' '--preserve-metadata=identifier,flags,runtime' '/var/folders/nl/3g6r8xf94j598_f07zh909x80000gn/T/XcodeDistPipeline.~~~EppFHG/Root/Payload/evtdisplay200418.app/Frameworks/CraftKit.framework'
    2020-04-23 15:45:16 +0000 /var/folders/nl/3g6r8xf94j598_f07zh909x80000gn/T/XcodeDistPipeline.~~~EppFHG/Root/Payload/evtdisplay200418.app/Frameworks/CraftKit.framework: replacing existing signature
    2020-04-23 15:45:16 +0000 /var/folders/nl/3g6r8xf94j598_f07zh909x80000gn/T/XcodeDistPipeline.~~~EppFHG/Root/Payload/evtdisplay200418.app/Frameworks/CraftKit.framework: code object is not signed at all
    2020-04-23 15:45:16 +0000 /usr/bin/codesign exited with 1

  • Posts: 549

    After some tricky detective work by myself and @Simeon we finally have the xcode export working for the validate step in the latest xcode 11.4.1. I expect simeon will send info once he has streamlined the process a bit.

  • Posts: 58

    Wonderful!! Thank you for your effort. If possible, I would like to submit a sample zipped project in order to make sure the project works under your environment at least. Please let me the way to submit the file to you.

  • edited May 2 Posts: 549

    @Makoto you should be able to do it all yourself now. Starting from your existing exported project files in the project on your disk (not inside xcode) edit the libversion to 3.2.1. Then delete all the framework files on your disk (not inside xcode). In the xcode delete the references to the frameworks on the left side panel. Control click to get that option-do not delete the files here just the references. Then you should be able do a build. The first time will take awhile as the new frameworks will be automatically uploaded to your project. You may have add a privacy declaration for the camera in the info.plist. Currently it will not work with the simulator, but you should be able to build and upload to a connected device or make an archive for the app store connect.

  • Posts: 549

    @Simeon even for a testflight submission, the app store connect seems to imply we need to provide a license agreement. Is that the case or is only if you want a license agreement different than some default license? If i really need to supply a license agreement, could you suggest one i could start from and adapt?

  • SimeonSimeon Admin Mod
    Posts: 5,400

    @piinthesky do you mean privacy policy?

    @Makoto if you export from Codea 3.2.1 you should be good to go, but yes you will need to add the privacy usage descriptions

  • Posts: 549

    @Simeon one has to provide a url for the privacy policy, but there is also a place to add a license agreement text in the testflight submission.

  • SimeonSimeon Admin Mod
    Posts: 5,400

    @piinthesky I've never provided a license agreement, but we do provide a Codea privacy policy here: https://codea.io/privacy

  • Posts: 549

    @Simeon good, then i guess it must be optional!-it is not at all clear in the interface. Thanks for the privacy, based on that I submitted my first testflight today-let's see if it works!

  • Posts: 58

    @Simeon Thank for your effort to fix the issue. Now I can make an archive and submit to apple store a zipped project with Codea 3.2.1 under iOS 13.4.1. In order for archiving in Xcode, since building for simulator gives an error, I need to connect a device to build the project to enable the archiving function.

    Thus the ultimate problem was cleared, I just want to clarify the method you suggested for a project zipped with Codea 3.1.
    You mentioned " In the xcode delete the references to the frameworks on the left side panel. Control click to get that option-do not delete the files here just the references. ", but I can not find 'delete reference only' option other than "Delete" (file) option. I don't see any changes with "Control key" in the option list with mouse button click.
    Please tell me more about the way to delete reference.
    Without this step, the zipped file with Codea 3.1 gets an error in building for a connected device,even Frameworks folder has only one file, libversion whose content is "3.2.1".

Sign In or Register to comment.