Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 11 Next capture
2021 2022 2023
1 capture
11 Jun 22 - 11 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by LT23Live · Jul 26, 2015 at 07:05 PM · iosinputmobilebrowseropenurl

Unity IOS - Open a In-App Web Browser

I am making an app for iOS. I have a couple links, that open up safari browser and leaves my app. I want to make it so the app opens a browser extension but does not leave the app. An example of an app that has been doing this is Facebook Mobile, when you open a link, it loads it with the in-app browser. I hope you understnad what i mean. I guess I am not the best at explaining, but I hope you can help me. Thanks!

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image fafase · Jul 26, 2015 at 07:13 PM 0
Share

I tried that same question about 2 months ago. I even tried it on SO and got awarded the tumbleweed reward. Good luck.

avatar image LT23Live · Jul 29, 2015 at 01:23 AM 0
Share

LOL Oh wow. if i Figure it out i will let you know

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by lemonyama · Jul 30, 2015 at 12:50 PM

Your Unity app will have to talk to your main app delegate (UnityAppController.mm) and then you just use Objective C to create an add a UIWebView in your main window to open up the URL.

For the interface from Unity to iOS you will need to define the following in your .cs:

 [DllImport ("__Internal")]
 private static extern void _Hello (string service);
 
 public static void Hello(string message)
     {
         // Call plugin only when running on real device
         if (Application.platform != RuntimePlatform.OSXEditor)
             _Hello(message);
     }
 
 

Then in your objective C Xcode:

     extern "C" {
         
         void _Hello (const char* message)
         {
             NSLog(@"Hello");
 
 NSString *msg = [NSString stringWithFormat: @"%s", message];
             [GetAppController() hello:msg];
         }
 
     }

In your Objective C main app delegate class proper you can then have:

 -(void)hello:(NSString*)message {
      NSLog(@"hello: %@",message);
 // or just open a new UIWebView here and attach it to the window
 }

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Piotrku · Mar 22, 2016 at 04:03 AM

Please check out my plugin, which does exactly what you want to achieve: https://www.assetstore.unity3d.com/en/#!/content/57532

Comment
Add comment · Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image joyjeba28 · May 09, 2016 at 06:01 AM 0
Share

@piotruku i wants to purchase your plugin .. can i use it any game or is there any limit for this ... Can i use it with any bundle identifier..

avatar image Piotrku joyjeba28 · May 09, 2016 at 12:09 PM 0
Share

yeah, you can use it wherever you want (on iOS and Android platforms of course)

avatar image Labs_totalmobile · Nov 27, 2017 at 05:04 PM 0
Share

Does your plugin allow for capture of a redirect url? Eg. to catch an oAuth 2.0 access code?

avatar image Ilshat-dev86 · Apr 20, 2019 at 06:02 AM 0
Share

Hello, when use in-app-browser on ios? I user in-app-browser on android, but if i switch platform to ios and build project, then in-app-browser not workinkg Pls help other plugins (uniwebview3) also not working...

avatar image Piotrku · Apr 23, 2019 at 12:55 PM 0
Share

@Ilshat-dev86 please post your issue at our support forum. Please include exact description of issues you are experiencing („not working” is too vague).

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

27 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Mecanim for Mobile Devices 2 Answers

Cells for a mobile app stacked vertically, not moving correctly 0 Answers

Vertical mobile input 0 Answers

Input.inputString on iOS - Empty? 0 Answers

Using the Volume Control Buttons On Mobile Devices 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges