Commit 4d334013e3950dc1a635aa03f4cbe205411b02ae

Authored by thiago.filipe
1 parent b5376d0f
Exists in IosBuild

Finish IOS

Assets/Plugins/IOS/iOSNativeShare.m
... ... @@ -50,22 +50,11 @@ extern UIViewController* UnityGetGLViewController();
50 50 void SendToGallery(NSString *path){
51 51 if(UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(path)){
52 52 //UISaveVideoAtPathToSavedPhotosAlbum (path,self, nil, nil);
53   - UISaveVideoAtPathToSavedPhotosAlbum (path,self, @selector(video:didFinishSavingWithError:contextInfo:), nil);
  53 + UISaveVideoAtPathToSavedPhotosAlbum (path,nil, nil, nil);
54 54 //ShowAlertMessage(@"Vlibras Vídeo",@"Video salvo na galeria.");
55 55 }
56 56 }
57 57  
58   -- (void)video:(NSString*)videoPath didFinishSavingWithError:(NSError*)error contextInfo:(void*)contextInfo
59   -{
60   - if (error)
61   - {
62   - ShowAlertMessage(@"Vlibras Vídeo",@"Error ao salvar vídeo.");
63   - }
64   - else
65   - {
66   - ShowAlertMessage(@"Vlibras Vídeo",@"Video salvo na galeria.");
67   - }
68   -}
69 58  
70 59 void ShowAlertMessage (NSString *title, NSString *message){
71 60  
... ... @@ -161,15 +150,6 @@ void ShowAlertMessage (NSString *title, NSString *message){
161 150 return self;
162 151 }
163 152  
164   --(BOOL) isStringValideBase64:(NSString*)string{
165   -
166   - NSString regExPattern = @"^(?:[A-Za-z0-9+/]{4})(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$";
167   -
168   - NSRegularExpression *regEx = [[NSRegularExpression alloc] initWithPattern:regExPattern options:NSRegularExpressionCaseInsensitive error:nil];
169   - NSUInteger regExMatches = [regEx numberOfMatchesInString:string options:0 range:NSMakeRange(0, [string length])];
170   - return regExMatches != 0;
171   -}
172   -
173 153 # pragma mark - C API
174 154 iOSNativeShare* instance;
175 155  
... ...
Assets/Scripts/Export Video/MediaShareIOS.cs
... ... @@ -53,7 +53,7 @@ public class MediaShareIOS : MonoBehaviour {
53 53 SourceStream.Write(videoContent, 0, bytes);
54 54 SourceStream.Close();
55 55 ShareIOS.CallSendToGallery(Path.Combine(path,FilePath));
56   - yield return new WaitForSeconds(0.5f);
  56 + yield return new WaitForSeconds(1.0f);
57 57  
58 58 finishWriting();
59 59  
... ... @@ -62,13 +62,10 @@ public class MediaShareIOS : MonoBehaviour {
62 62 }
63 63 else
64 64 {
65   - // new AndroidToast().showToast("Erro ao salvar vídeo.", "LONG");
  65 +
66 66  
67 67 errorWriting();
68   - }
69   -
70   -
71   -
  68 + }
72 69  
73 70  
74 71 yield break;
... ...