tpitman

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • in reply to: UIWebView deprecation #1715
    tpitman
    Participant

    That must have just dropped. Awesome. Thanks!

    in reply to: UIWebView deprecation #1710
    tpitman
    Participant

    I wanted to verify where the UIWebView reference might be coming from, so I created a brand new project in 2019.2.6f. I made it a simple 2D project without any extra packages.

    I then imported just your plugin.
    Deleted the source files.
    Added the .a file (206)
    Opened your example scene.
    Made that scene the default in project settings.
    Switched the target to iOS.
    Added a bundle ID from my Apple account.
    Did a build to make sure it runs on my iPhone.
    Archived the package for the Apple store.
    Uploaded the archive to the Apple store.

    I got the same warning that my app contains UIWebView and it is deprecated.

    I am not sure what to tell you. I didn’t add anything else. Only your package.

    Can you please confirm that you can create an empty project with your plugin in it and it won’t get this warning when you upload it to your account before you release it?

    UPDATE: I just did the grep thing and found UIWebView in the libiPhone-lib.a file. Do you include this file or is this something that is default in Unity? I am reading posts, but not sure yet. If Unity then carry on, but maybe you will want to include in the release notes that you have done all you can, but we will still get the warning until Unity fixes it.

    • This reply was modified 4 years, 5 months ago by tpitman.
    in reply to: UIWebView deprecation #1695
    tpitman
    Participant

    I have tried the new beta version and it still gave me the warning when I uploaded the app to the Apple store for internal testing.

    in reply to: UIWebView deprecation #1689
    tpitman
    Participant

    I just uploaded my app for test flight testing with the new .a file after removing the other files in the plugin.

    I still got the warning about using the UIWebView api. Can you explain? Are you able to upload an app and not get that warning?

    in reply to: UIWebView deprecation #1688
    tpitman
    Participant

    Everything seems to be working fine now. Thank you for the quick turn around.

    What are your plans for releasing this as an official update?

    in reply to: UIWebView deprecation #1687
    tpitman
    Participant

    The crash must have been coming from something left over in the ios project. Even though I did a clean build before it seems that I needed to completely delete the ios output folder.

    Now I am getting my web page and not crashing.

    in reply to: UIWebView deprecation #1686
    tpitman
    Participant

    I was able to open the test scene in my app. I reimported everything into my project and deleted my ios output folder before building.

    Now the issue I have with the example scene is that I get this error:

    2019-09-27 07:30:20.940812-0600 espresso[14485:5127650] -canOpenURL: failed for URL: “inappbrowserbridge://ping” – error: “This app is not allowed to query for scheme inappbrowserbridge”

    Seems like a permissions thing??? Do you have a new test site page for your new component?

    in reply to: UIWebView deprecation #1685
    tpitman
    Participant

    By the way I am using Unity 2019.2.3f1 if that matters.

    I created a new project and imported the latest from the Unity Asset store. I then deleted the files in the iOS folder and put the 206.a file there.

    I built it for ios and ran it. It runs fine without crashing and shows the web page. When I hit the button to ping unity it gives errors, but they are probably because I didn’t change any of the default code.

    Since this works I will try to figure out what is different.

    One thing: your example waits for the user to press a button before loading the web component and showing the web page. I do it on startup because my whole app is web based. Could that have something to do with the issues? Do I have to wait for something to initialize first? Can you do some testing on that?

    in reply to: UIWebView deprecation #1683
    tpitman
    Participant

    It doesn’t crash like my scene does, but it doesn’t work either.

    in reply to: UIWebView deprecation #1682
    tpitman
    Participant

    Finally got a chance to try this. When I build and run the example scene with the old UIWebView source it works fine.

    I then followed your instructions to remove the source files from the iOS folder and drop the .a file in that folder and it doesn’t work.

    I get this output in the debug window of xcode:

    InAppBrowserBridge:OnBrowserStartedLoading(String)
     
    (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 48)
    
    2019-09-26 16:04:48.806513-0600 espresso[13808:5005423] [ProcessSuspension]  0x281ef8fc0 - ProcessAssertion() Unable to acquire assertion for process with PID 0
    2019-09-26 16:04:49.327990-0600 espresso[13808:5005524] [ProcessSuspension]  0x281efabc0 - ProcessAssertion() Unable to acquire assertion for process with PID 0
    in reply to: UIWebView deprecation #1680
    tpitman
    Participant

    I did regen the xcode project. I will try the sample scene.

    in reply to: UIWebView deprecation #1673
    tpitman
    Participant

    I am the one who posted that the app crashes on iOS. I gave the crash stack in case that would give some idea of what is going on.

    With a crash that means I don’t get anywhere with it.

    The string I gave you is just what the web page is expecting to process in JavaScript. As far as your plugin goes I think it should just be passing that along to the web page JavaScript.

    • This reply was modified 4 years, 6 months ago by tpitman.
    in reply to: UIWebView deprecation #1670
    tpitman
    Participant

    I am confused about the new communication mechanism. I start typing webkit and it isn’t defined.

    Here is some of my code:

    
    	private void Start ()
    	{
    		InAppBrowser.ClearCache ();
    		InAppBrowserBridge bridge = FindObjectOfType<InAppBrowserBridge> ();
    		bridge.onJSCallback.AddListener (OnMessageFromJS);
    		bridge.onBrowserStartedLoading.AddListener (OnBrowserStartedLoading);
    	}
    
    	private void Awake ()
    	{
    		InAppBrowser.DisplayOptions options = new InAppBrowser.DisplayOptions ();
    		options.displayURLAsPageTitle = false;
    		options.pageTitle = "My App";
    		options.hidesTopBar = true;
    
    		InAppBrowser.OpenURL ("https://myapp.com", options);
    	}
    

    Here is a place where I send some Json to the browser javascript:

    InAppBrowser.ExecuteJS("$nuxt.messageFromUnity('{\"success\": \"" + success + "\"}');");

    in reply to: UIWebView deprecation #1662
    tpitman
    Participant

    Not sure this will be much help, but here is the top part of the exception stack:

    
    	0   CoreFoundation                      0x000000019c65ead0 <redacted> + 256
    	1   libobjc.A.dylib                     0x000000019b863d00 objc_exception_throw + 60
    	2   CoreFoundation                      0x000000019c57c4d4 <redacted> + 0
    	3   CoreFoundation                      0x000000019c664464 <redacted> + 1412
    	4   CoreFoundation                      0x000000019c666260 _CF_forwarding_prep_0 + 96
    	5   espresso                            0x0000000102d58978 +[InAppBrowserConfig(DisplayOptionsStruct) fromDisplayOptions:] + 356
    	6   espresso                            0x0000000102d54c6c _ShowURLWithDisplayOptions + 120
    	7   espresso                            0x0000000102d54e74 _OpenInAppBrowser + 104
    	8   espresso                            0x0000000102d686b4 iOSInAppBrowser__OpenInAppBrowser_mC93248E1F49443BED3C3D03A7C55783E7EAFE0C4 + 108
    	9   espresso                            0x0000000102d67064 CliveWebBrowserScript_Awake_mC890CB4E232C63AD0AA251991D4ECD40F2EEB86A + 132
    	10  espresso                            0x000000010240ae50
    
    in reply to: UIWebView deprecation #1661
    tpitman
    Participant

    I followed your instructions to download the .a file and remove the other files. It builds fine, but when I run it I get an exception.

    I am using javascript interaction. Do I have to change any of that for it to work?

Viewing 15 posts - 1 through 15 (of 16 total)