Search Unity

[Closed] Etcetera Plugin Live! Alerts, prompts, loading views, push, localization and more!

Discussion in 'iOS and tvOS' started by prime31, Oct 18, 2010.

  1. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @john, the iOS picker allows only a single image to be selected.
     
  2. vdeamonn

    vdeamonn

    Joined:
    Oct 17, 2013
    Posts:
    1

    J3,

    2013-10-04 21:29:20.995 wildrose[7129:907] Warning: Attempt to present <UINavigationController: 0x14a3110> on <UnityDefaultViewController: 0x225c3e0> whose view is not in the window hierarchy!

    We are getting the same error in our app. Did you ever find a solution for this?
     
  3. umanggameanax

    umanggameanax

    Joined:
    Feb 5, 2013
    Posts:
    3
    @prime31, For askforreview Android version have pop up contains three button but how's it work of "Remind me later".
    If i press remind later what will effect in the same.
     
  4. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @umangindianic, you control when it will remind the user later with the parameters of the askForReview method. Here is a snippet from the documentation:

    Shows the ask for review prompt with constraints. launchesUntilPrompt will not allow the prompt to be shown until it is launched that many times.
    hoursUntilFirstPrompt is the time since the first launch that needs to expire before the prompt is shown
    hoursBetweenPrompts is the time that needs to expire since the last time the prompt was shown
    NOTE: once a user reviews your app the prompt will never show again until you call resetAskForReview
     
  5. Andre-Barbosa

    Andre-Barbosa

    Joined:
    May 3, 2013
    Posts:
    11
    I have exactly the same issue, on iOS 7 only.

    Using iOS 7.0.2 version and Unity 4.3.

    The photo preview has portrait orientation, when it should be landscape. Only happens on iOS 7.
     
    Last edited: Dec 4, 2013
  6. SuperTalesNat

    SuperTalesNat

    Joined:
    Mar 20, 2013
    Posts:
    18
    Using Etcetera with iOS7, Xcode 5.0.2, Unity 4.3.1 and i'm getting this error on build:

    Undefined symbols for architecture armv7:
    "_OBJC_CLASS_$_ALAssetsFilter", referenced from:
    objc-class-ref in EtceteraManager.o
    "_OBJC_CLASS_$_CNNAssetsPickerController", referenced from:
    objc-class-ref in EtceteraManager.o

    I added the AssetsLibrary.framework and it got rid of the first error (ALAssetsFilter) but the second one persists, and with adding the assets framework i'm also getting a Mach-O Linker error too:

    Undefined symbols for architecture armv7:
    "_OBJC_CLASS_$_CNNAssetsPickerController", referenced from:
    objc-class-ref in EtceteraManager.o
    ld: symbol(s) not found for architecture armv7
    clang: error: linker command failed with exit code 1 (use -v to see invocation)


    Help? Trying to get this app submitted tonight to Apple to try and beat the Christmas deadline.

    Nathaniel Hunter
    SuperTales Inc.
     
  7. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @super, you have to set your Deployment Target to iOS 5 or newer. If you updated from a previous version of the plugin you will also want to Clean your Xcode project to clear out cached files.
     
  8. SuperTalesNat

    SuperTalesNat

    Joined:
    Mar 20, 2013
    Posts:
    18
    Thanks. Right before you replied, i nuked my previous build path, and it was definitely some old build that had conflicting caches, works like a charm now.

    Nathaniel Hunter
    SuperTales Inc.
     
  9. Wiivan

    Wiivan

    Joined:
    Dec 17, 2013
    Posts:
    7
    Undefined symbols for architecture armv7:
    "UnityPause(bool)", referenced from:
    -[StoreKitManager displayStoreWithProductId:] in libStoreKit.a(StoreKitManager.o)
    ___45-[StoreKitManager displayStoreWithProductId:]_block_invoke in libStoreKit.a(StoreKitManager.o)
    ___50-[StoreKitManager productViewControllerDidFinish:]_block_invoke in libStoreKit.a(StoreKitManager.o)
    ld: symbol(s) not found for architecture armv7
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    Anyone knows how to get rid of this error?
     
  10. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @wiivan, you are using a version of the plugin from at least 3 months ago. Update to the latest version and rebuild your Xcode project to clear up the error.
     
  11. quaigon

    quaigon

    Joined:
    Aug 16, 2013
    Posts:
    8
    same problem since update to iOS 7.

    is prime31 working on this problem? there had not yet been any reactions ?!
     
  12. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @quaigon, we can't affect the private photo picker view without using private APIs. I have already sent a bug report to Apple and I suggest that you do the same.
     
  13. ehermite

    ehermite

    Joined:
    Nov 13, 2012
    Posts:
    7
    I m using vuforia 2.87 (package) with unty4.32. Prime31 etcetera.

    once i run and build to my ipad (retina), the camera function doesn't work...

    what's wrong with it, Prime31?
     
  14. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ehermite, that sounds like a question you will want to ask to Vuforias maintainers. Their plugin grabs a handle to the camera hardware at launch, not ours.
     
  15. Fulke

    Fulke

    Joined:
    Nov 24, 2013
    Posts:
    12
    Hey guys,

    I'm having some issues with taking a screenshot and moving it to the photo album. I have tried all of the solutions I could find in this thread and various others, but no luck. Any help would be greatly appreciated. Cheers!

    Code (csharp):
    1.  
    2. IEnumerator takeScreenshot ()
    3.     {
    4.         screenshotCount = string.Format ("{0:000000}", screenshotCount);
    5.         filename = screenshotCount + ".png";
    6.         documentsPath = GetiPhoneDocumentsPath ();
    7.  
    8.         // Disabling everything I don't want in the screenshot
    9.         yield return new WaitForEndOfFrame ();
    10.         // Playing audio clip
    11.  
    12.         StartCoroutine( EtceteraBinding.takeScreenShot(filename) );
    13.  
    14.         yield return new WaitForSeconds (0.2f);
    15.  
    16.         // Fading camera from white to give a flash effect
    17.         // Enabling stuff again
    18.  
    19.         screenshotCount++;
    20.                 filename = documentsPath + filename;
    21.  
    22.         if (File.Exists (filename)) {
    23.             EtceteraBinding.saveImageToPhotoAlbum (filename);
    24.         }
    25.     }
    26.  
    27.     public static string GetiPhoneDocumentsPath ()
    28.     {
    29.         // Your game has read+write access to /var/mobile/Applications/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/Documents
    30.         // Application.dataPath returns
    31.         // /var/mobile/Applications/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/myappname.app/Data
    32.         // Strip "/Data" from path
    33.         string path = Application.dataPath.Substring (0, Application.dataPath.Length - 5);
    34.         // Strip application name
    35.         path = path.Substring(0, path.LastIndexOf('/'));
    36.         return path + "/Documents";
    37.     }
    38.  
     
  16. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @fulke, you are trying to call saveImageToPhotoAlbum before the image is done being written to disk. You should be yielding the call to takeScreenShot. See showMailComposerWithScreenshot method contents for an example of how to do this.
     
  17. ehermite

    ehermite

    Joined:
    Nov 13, 2012
    Posts:
    7
    hi Mike,

    I get it work , vuforia 2.87 + Prime31 Etcetera + unity3d 4.32

    the solution is, no need to rename "PostProcessBuildPlayer" to any other.
    I think both of you have solved these.

    import vuforia > import Prime31 = build (done)!


    anyhow, thanks pirme31
     
  18. Fulke

    Fulke

    Joined:
    Nov 24, 2013
    Posts:
    12
    That's just
    Code (csharp):
    1. yield return StartCoroutine( EtceteraBinding.takeScreenShot(filename) );
    right? I tried adding that in but the app will just freeze up as it takes the screenshot and go no further.
     
  19. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @fulke, a coroutine should never freeze your app. It's entire purpose is to spread out long calls over many frames.
     
  20. APorterGC

    APorterGC

    Joined:
    May 24, 2013
    Posts:
    6
    Howdy Prime,

    I've run into a strange issue with the EtceteraBinding.askForReview call.
    We were previously on Unity 3.5.7 and we recently updated to 4.2.2 and it seems like the Review dialog on iOS doesn't accept input ~70% of the times it is shown. The user is just stuck at the screen unable to hit "OK!" nor "Cancel" and has to force close the app.

    We were on a previous version of the Etcetera plugin, but while debugging this I upgraded to current to no effect.

    I was wondering if you had any ideas what might be causing this.

    Thanks!
     
  21. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @aporter, I can't say I have ever heard of anything like it. I would suggest checking the device logs to see what could be happening while it is running in Xcode.
     
  22. as-justis

    as-justis

    Joined:
    Aug 29, 2012
    Posts:
    10
    Hi Prime31,

    I am using push messages on iOS through your Etcetera plugin. All works well, but I just cannot find the way to read pending push messages. Is there a way for that? This is needed to be able to display a message when the user opens application through app icon (not pressing the push notification). It seems that adding functions for remoteNotificationReceivedEvent and remoteNotificationReceivedAtLaunchEvent events doesn't cover this case.
     
  23. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @as, you cannot access a pending push notification. The best way to handle that is to use your server to store all the pushes that you sent so that you can retrieve them on device at any time.
     
  24. as-justis

    as-justis

    Joined:
    Aug 29, 2012
    Posts:
    10
    Oh, I got it now. Many thanks :))
     
  25. Alessaint

    Alessaint

    Joined:
    Mar 21, 2011
    Posts:
    43
    Hi,

    is there a way to clear the text in sms client? I have an application that allows user to buy items by sending predefined sms string to certain number . The problem is that when he presses buttonA, sms composer opens and message "MessageA" is inserted in text area. If he, however, presses Back (because he changed his mind, for example), and presses button B, sms composer opens again but the string is placed before the previous one resulting in "MessageBMessageA" text. I need to find a way to clear this message so that the user can't send some meaningless gibberish.
     
  26. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @alessaint, Apple provides no access to the details of the SMS app
     
  27. Tripwire

    Tripwire

    Joined:
    Oct 12, 2010
    Posts:
    442
    Hi Prime,

    I'm getting an App Crash when using this code:
    Code (csharp):
    1.  
    2. public void ShowPopup(string header, string message)
    3. {
    4.     buttons = new string[1];
    5.     buttons[0] = "Ok";
    6.     EtceteraBinding.showAlertWithTitleMessageAndButtons(header, message, buttons);
    7. }
    8.  
    I've added the EtceteraEventListener from the demo scripts to my scene.

    It seems to be crashing on EtceteraBinding.showAlertWithTitleMessage();

    Error i'm getting in Xcode:
    #9 0x012183d0 in MonoBehaviour::CallMethodIfAvailable(int) [inlined] at /Applications/buildAgent/work/d3d49558e4d408f4/Runtime/Mono/MonoBehaviour.cpp:529

    0x12183d0: sub sp, r7, #12 Thread 1: EXC_BAD_ACCESS(code=1, address = 0x3c)

    I've downloaded the latest version of Prime31 from the asset store and ran the updater in the Prime31 menu. Did something change in iOS 7 or something?

    EDIT:
    I'm using Unity#D 4.3.3f1 and the latest version of Xcode and the latest version of iOS on my iPhone 5s.
     
    Last edited: Feb 21, 2014
  28. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @trip, I can't seem to reproduce. Please include a full backtrace showing the crash.
     
  29. XCO

    XCO

    Joined:
    Nov 17, 2012
    Posts:
    380
    Hello PRIME 31 I am looking to buy your plug in for the sake of adding GameCenter and i-ads but I am not so great at programming (I make my games with visual scripting). How easy would it be for me to add gamecenter and iads is there a step by step guide that a programming noob like me could follow ?

    I am actually quite desperate I have been searching for weeks now and I just cant get anyone to help me :(

    I just need a simple basic lesson/example... If i buy your plug in and I have a bunch of noob questions, would you help me ?
     
  30. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @XCO, every one of our plugins comes with a very simple demo scene illustrating every available feature the plugin offers. You can copy/paste the code from the demo scene in to the relevant part of your game to get a quick start.
     
  31. shadowfork

    shadowfork

    Joined:
    Jan 8, 2010
    Posts:
    167
    Hello Prime31 guys,

    Can you help me with the webview not playing embedded youtube video?

    I simply put:

    Code (csharp):
    1. EtceteraBinding.showWebPage( "http://illegalpixel.com/play.php?id=dQw4w9WgXcQ", true );
    The video thumbnail shows up but after pressing the play button, it just goes black. This happens to any youtube link I put in there.

    If you open it in safari (http://illegalpixel.com/play.php?id=dQw4w9WgXcQ), it plays just fine but not on the webview.

    Is there something I'm missing here? I have the wrapper setup fine on the php page, coz otherwise the thumbnail won't show up.

    I mean it works okay in safari, what would cause it to behave differently on webview?

    Thanks in advance.

    Running:
    - Unity 4.3.4
    - iOS 7
     
    Last edited: Mar 1, 2014
  32. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @shadow, the iOS webview renderer is fully closed source. Chances are you have to setup your embed tags correctly. I would suggest searching Stack Overflow or the standard iOS devforums to see how others have done it.
     
  33. shadowfork

    shadowfork

    Joined:
    Jan 8, 2010
    Posts:
    167
    Thanks for the quick reply.

    Granted I i didn't setup my embed tags correctly... how come this doesn't work either:
    Code (csharp):
    1. EtceteraBinding.showWebPage( "https://www.youtube.com/watch?v=dQw4w9WgXcQ", true );
    Did Youtube not set their embed tags correctly as well?

    In any case, I'll look at the sites you suggested.

    Thanks.
     
    Last edited: Mar 1, 2014
  34. shadowfork

    shadowfork

    Joined:
    Jan 8, 2010
    Posts:
    167
    Last edited: Mar 1, 2014
  35. shadowfork

    shadowfork

    Joined:
    Jan 8, 2010
    Posts:
    167
    Can you provide us where we can find the file to edit this line mentioned from the link above:

    Code (csharp):
    1. [myWebView loadHTMLString:string]
    or where can we add this line in your code as the fix suggested:
    Code (csharp):
    1. [myWebView setMediaPlaybackRequiresUserAction:NO];
     
    Last edited: Mar 1, 2014
  36. shadowfork

    shadowfork

    Joined:
    Jan 8, 2010
    Posts:
    167
    Found it. For everyone experiencing this issue, add

    Code (csharp):
    1. [_webView setMediaPlaybackRequiresUserAction:NO];
    on P31WebController.m, line 176 is where I placed mine and worked!
     
  37. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @shadow, it's always some obscure, wacky little thing ;)
     
  38. Conflei

    Conflei

    Joined:
    Apr 21, 2013
    Posts:
    44
    Hello, i'm new using this Plugin. I'm having this error when i try to load the texture with Etcetera Plugin:

    textureLoadFailed .

    I already prompt for photo and take it.

    Please help.
     
  39. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @conflie, lets start with the basics. Provide all of the following: device you are using, OS version on that device, the exact steps to reproduce what you are seeing using the demo scene, full log output.
     
  40. Conflei

    Conflei

    Joined:
    Apr 21, 2013
    Posts:
    44
    Ipod Touch 5 SO 7.0.4
    I Update my Etcetera plugin and i was having troubles with "AppController.h not found", so i was searching in forums and someone toldme to replace that for UnityAppController.h, i do it and it works.
    I use the test scenes and works the prompt photo, get size, get path... but the load texture says fail. :/
     
  41. Conflei

    Conflei

    Joined:
    Apr 21, 2013
    Posts:
    44
    I deleted that because i read that i will not need it, how can i restore?

    thanks prime31
     
  42. Conflei

    Conflei

    Joined:
    Apr 21, 2013
    Posts:
    44
    Solved.
     
  43. shadowfork

    shadowfork

    Joined:
    Jan 8, 2010
    Posts:
    167
    Hi Prime,

    I'm trying to call showWebView( string url ) on android and it's not showing up even with your scene.

    I get this error:
    Code (csharp):
    1. E/Prime31(3169): Exception running command on UI thread: Unable to find explicit activity class {com.mydomain.appName/com.prime31.WebViewActivity}; have you declared this activity in your AndroidManifest.xml?
    2.  
    Do you have a fix for this?
     
  44. shadowfork

    shadowfork

    Joined:
    Jan 8, 2010
    Posts:
    167
    It seems that the Vuforia plugin has overwritten the manifest:

    Code (csharp):
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.qualcomm.QCARUnityPlayer" android:versionCode="1" android:versionName="1.0">
    3.   <uses-sdk android:minSdkVersion="8" />
    4.   <uses-feature android:name="android.hardware.camera" />
    5.   <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:anyDensity="true" />
    6.   <uses-permission android:name="android.permission.INTERNET" />
    7.   <uses-permission android:name="android.permission.CAMERA" />
    8.   <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    9.   <application android:icon="@drawable/app_icon" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:debuggable="false">
    10.     <activity android:name="com.qualcomm.QCARUnityPlayer.QCARPlayerNativeActivity" android:label="@string/app_name" android:screenOrientation="portrait" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
    11.       <meta-data android:name="android.app.lib_name" android:value="unity" />
    12.       <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
    13.       <intent-filter>
    14.         <action android:name="android.intent.action.MAIN" />
    15.         <category android:name="android.intent.category.LAUNCHER" />
    16.       </intent-filter>
    17.     </activity>
    18.     <activity android:name="com.unity3d.player.VideoPlayer" android:label="@string/app_name" android:screenOrientation="portrait" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
    19.     </activity>
    20.   </application>
    21. </manifest>
    22. <!-- android:installLocation="preferExternal" -->
    So I guess my question is how do I keep both plugins coexist?
     
  45. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @shadow, you can just use our manifest as a base then add the Vuforia additions manually (or vice versa).
     
  46. shadowfork

    shadowfork

    Joined:
    Jan 8, 2010
    Posts:
    167
    Cool, that worked. Thanks!
     
  47. shadowfork

    shadowfork

    Joined:
    Jan 8, 2010
    Posts:
    167
    Hi guys,

    Was wondering if you can help me out with memory issue using Etcetera's showWebPage() function...

    Before opening the url, I have 163mb. When the plugin launches to open the url, it jumps to 194mb.

    Fair enough... but is there a way to get back the memory after closing it?

    Even calling System.GC.Collect() only shaves off about 2 - 5mb... so it's still around 185++mb
    ... and it only keeps going up when I open other URLs.

    Any tips how I can free up memory after the use of the plugin?

    Screen Shot 2014-07-23 at 1.35.21 PM.png Screen Shot 2014-07-23 at 1.35.41 PM.png
     
  48. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    GC.Collect will not have any effect at all on native code. When the web view is dismissed it is entirely released from memory. Note that iOS will not lower the used memory utilized until memory is actually requested by an application. That is just the way memory works on iOS.
     
  49. Jeet_9811

    Jeet_9811

    Joined:
    May 6, 2014
    Posts:
    17
    Hi Prime31,

    We want to show a overlay on top of the camera screen in our game. The overlay should show only a part of the camera screen where the player will click the photograph and save the screenshot. I want to know if this is possible from the Etcetera Android plugin.

    Thanks,
    Jeetesh
     
  50. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    No it is not possible. The Etcetera plugin uses only the default iOS/Android photo picker which is full screen.